#include<func.h>
void * pthread_func(void *p)
{
    strcpy(p,"hello");
    printf("i am child thread\n");
}
int main()
{
    pthread_t pthid;
    char *ch;
    ch=(char*)malloc(100);
    int ret=pthread_create(&pthid,NULL,pthread_func,ch);
    if(ret!=0)
    {
        printf("pthread_creat failed\n");
        return -1;
    }
    usleep(1);
    printf("I am main thread\n");
    printf("get:%s\n",ch);
    return 0;
}